package com.ruoyi.web.controller.system;


import com.ruoyi.common.core.page.ResponseResult;
import com.ruoyi.system.domain.MerchantLog;
import com.ruoyi.system.service.MerchantLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "管理后台:用户通道接口")
@RestController
@RequestMapping("/admin/merchantLog")
public class AdminMerchantLogController extends AdminController {
    @Resource
    private MerchantLogService logService;


    @ApiOperation(value = "用户通道列表")
    @GetMapping("list")
    public ResponseResult<List<MerchantLog>> list(MerchantLog merchantLog) {
        this.checkAdmin();
        this.startPage();
        List<MerchantLog> list = logService.findList(merchantLog);
        return this.setSuccessResult(this.getPageResult(list));
    }


    @ApiOperation(value = "详情")
    @GetMapping("getById")
    public ResponseResult getById(Long id) {
        this.checkAdmin();
        MerchantLog merchantLog = logService.getById(id);
        return this.setSuccessResult(merchantLog);
    }


}
